Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

LotusScript COM: Open a NotesDocument in UI

I am working on coexistence between Microsoft Outlook and IBM Lotus Notes Domino. I am adding context menu's where items in MS Outlook that originated from Lotus Notes should show a "Open Document" in the right click menu in Outlook. When that menu option is clicked it should open up the NotesDocument using the Document UNID stored in the Outlook Item. It errors out at the NotesUIWorkspace.EditDocument(doc) line. I don't think I can use UIWorkspace through COM to open a notesdocument.

I tried returning to a NotesUIDocument, that errors out, I tried all combinations of input parameters to EditDocument(boolvalue, doc, boolvalue), nothing works. Is there any other way?

Let me know if anyone figures out how to open a NotesDocument in the User Interface of Lotus Notes or alternative solutions.


Public Sub OpenLNDatabase(servername As String, dbname As String, docID As String, docKey As String)

Dim ws As Object '(NotesUIWorkSpace)
Dim cLotusNotes As New clsLotusNotes
Dim LNDb As NotesDatabase
Dim LNdoc as NotesDocument
Dim LNSession as new NotesSession

If (servername = "" Or dbname = "") Then
MsgBox "I am not configured to open this Lotus Notes database. Please contact support", vbCritical, Title
Exit Sub
End If

Set LNSession = New NotesSession
Call cLotusNotes.session.Initialize

Set ws = CreateObject("Notes.NotesUIWorkspace")

Set LNDb = LNSession.GetDatabase(servername, dbname)

If (docID = "" And docKey = "") Then
'THIS WORKS
Call ws.OpenDatabase(servername, dbname, "", "", "")
Else
'open document in database by docuid
If (docID <> "") Then
Set LNDoc = LNDb.GetDocumentByUNID(docID) 'works
Call ws.EDITDOCUMENT(LNDoc) 'automation error

Else
If (docKey <> "") Then
'search a view for a field value
'to get a handle to a notesdocument.
End If
End If

End If

Set ws = Nothing

End Sub


Feedback response number WEBB89ZLZC created by ~Autumn Zenfanagen on 10/07/2010

Reading Lotus Documents from .NET (... (~Fritz Zekkithe... 11.Jul.09)
. . Bad news (~Carol Cisvelus... 12.Jul.09)
. . second (~Fred Desluberg... 14.Jul.09)
. . crystal reports (~Ted Chuniter 15.Jul.09)
. . LotusScript COM: Open a NotesDocume... (~Autumn Zenfana... 7.Oct.10)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS